package edu.sctu.practice.class02.shuqiqi.test10;

/**
 * Created by admin on 2015/10/18.
 */
public class Addition {


    public int add(int a, int b) {
        int c = a + b;
        System.out.println(a + "+" + b + "=" + c);
        return c;
    }

    public long add(long a, long b) {
        long c = a + b;
        System.out.println(a + "+" + b + "=" + c);
        return c;
    }

    public float add(float a, float b) {
        float c = a + b;
        System.out.println(a + "+" + b + "=" + c);
        return c;
    }

    public double add(double a, double b) {
        double c = a + b;
        System.out.println(a + "+" + b + "=" + c);
        return c;
    }

    public String add(String a, String b) {
        String c = a + b;
        System.out.println(a + "+" + b + "=" + c);
        return c;
    }

    public static void main(String[] args) {
        Addition addition = new Addition();
        addition.add(12, 2);
        addition.add(295, 632);
        addition.add(58.8F, 31.9F);
        addition.add(342.4, 41.9);
        addition.add("A", "B");


    }

}
